You have not saved or rolled back the current changes and are trying to add or change another record. Use the Rollback or Update method, and then use the AddNew or Edit method.